import request from '@/utils/request'
import qs from 'qs'
export function loginByUsername(username, password,imgCode) {
  const data = {
    username,
    password,
    imgCode,
    client_id:'gds-admin',
    client_secret:123456,
    grant_type:'password',
    auth_type:'vc'
  }
  // console.log(data)
  return request({
    url: '/api/oauth/token',
    method: 'post',
    data:qs.stringify(data),
    headers:{"Content-Type":"application/x-www-form-urlencoded"}
  })
}

export function logout() {
  return request({
    url: '/api/token/revoke',
    method: 'post'
  })
}

export function getMenu() {
  return request({
    url: 'api/resource/menu',
    method: 'post',
  })
}

